package Experimentos;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Random;

import Algoritmos.*;


public class Bucket {

	private static int N=1000000;
	private static int nIt=1;
	
	public static double[] getRandomBucket(int n){
		int i;
		Random random=new Random();
		double[] array = new double[n];
		for(i=0;i<n;i++)
			array[i]=random.nextDouble();
		return array;
	}
	
	public static void main(String[] args) throws IOException {
		
		long time_start, time_end;
		int i;
		int it;
		double[] C;
		
		BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
	    String s = bufferRead.readLine();
	    
	    System.out.println("BUCKET-SORT");
	    
	    time_start = System.currentTimeMillis();
		for(i=100000;i<=N;i=i+50000){
			for(it=0;it<nIt;it++){
				C = getRandomBucket(i);	
				//Utils.display(C);
				BucketSort.bucketSort(C);
				//Utils.display(C);
			}	
		}
		time_end = System.currentTimeMillis();
		System.out.println("time: "+(time_end-time_start)+" mili-seconds");
	}

}
